<template>
	<view class="content" style="background-color: #f5f5f5;">
		<view class="top">
			<u-navbar scrollable=false :placeholder='true' :autoBack="true" title="">
				
				<view slot="right" class="input_right">
					<u-input prefixIcon="search" prefixIconStyle="font-size: 22px;color: #909399"
						placeholder="搜索聊天记录/店铺" suffixIcon="close" suffixIconStyle="color: #909399" border="surround"
						v-model="value" @change="change"></u-input>
						
				</view>


			</u-navbar>
		</view>
		
		<!-- 聊天记录和聊天历史不同时显示 -->

		<view class="history fontS28">
			<text class="fw6 fontS28">聊天历史</text>
			<image src="../../static/images/mess/trash_1.png" style="width: 48rpx;height: 48rpx;" mode=""></image>
		</view>
		<view class="history_text">
			<view class="li fw6" v-for="(item,index) in history_text">
			{{item}}
			</view>
		</view>

		<view class="chat" style="margin-top: 32rpx;margin-bottom: 24rpx;">
			<view class="fw6 fontS28 chat_text">
				聊天记录
			</view>
			<view class="li" v-for="(item,index) in 3">
				<view class="left">

				</view>
				<view class="right">
					<view class="inner fontS28">
						<view class="left fontS28">
							SEKIKON株式会社
						</view>
						<view class="right fontS24 co9">
							15:42
						</view>

					</view>
					<view class="inner_ fontS24 co9" style="margin-top: 20rpx;">
						通过设立海外办事处，只需直接进口，无需中注册...
					</view>
				</view>
			</view>
			<view class="fw6 fontS28 chat_text chat_text2" style="margin-top: 32rpx;margin-bottom: 24rpx;">
				聊天商品
			</view>
			<view class="shop">
				<view class="lis" v-for="(item,index) in 5" @longpress.stop.prevent='log' :key="index"
					style="float: left;">
					<u-image src="https://cdn.uviewui.com/uview/album/1.jpg" :lazy-load="true" width="100%"
						mode="widthFix">
					</u-image>
					<view class="bottomBox">
						<view class="goodsname fontS28 elipes2">SNIFF JAPAN S925纯银Access纯银Access纯银Accessories</view>
						<!-- <view class="wantbuynum fontS24">
							999人想买
						</view> -->
						<view class="flexJBC" style="align-items: flex-end;">
							<view class="unitPrice">
								<view>
									<text>￥</text>
									<text>200</text>
								</view>
								<view class="flex">
									<text class="gongyingsdhang">认证供应商</text>
								</view>
							</view>
							<view class="send">
								发送
							</view>
						</view>
					</view>
				</view>
			</view>
		</view>
	</view>
</template>



<script>
	export default {
		data() {
			return {
				value: '',
				history_text: ["女装", "手机", "儿童手机"]
			}
		},
		components: {
			// List
		},
		methods: {
			change(e) {
				console.log('change', e);
			}
		}
	}
</script>

<style lang="scss" scoped>
	/deep/.input_right{
		width: 180%;
	}
	/deep/.u-navbar__content__right{
		left:10%;
	}
	.content {
		.top {
			margin-bottom: 20rpx;
			
		}

		.history {
			// height: 28rpx;
			padding: 0 4%;
			display: flex;
			justify-content: space-between;
			line-height: 56rpx;
			height: 56rpx;
			margin: 32rpx 0 20rpx;
		}

		.history_text {
			padding: 0 4%;

			>.li {
				border-radius: 12rpx;
				float: left;
				padding: 8rpx 28rpx;
				background-color: white;
				margin-right: 20rpx;
			}
		}

		.chat {

			// border: 1px solid red;
			.chat_text {
				padding: 0 4%;
				margin-bottom: 20rpx;
			}

			.chat_text {
				margin-top: 20rpx;
			}

			// padding: 0 4%;
			.li {
				background-color: white;
				// margin: 20rpx 4%;
				height: 180rpx;
				display: flex;
				border-bottom: 4rpx solid #f3f3f3;
				// border: 1px solid tomato;
				padding: 0 4%;

				>.left {
					margin-top: 40rpx;
					width: 100rpx;
					height: 100rpx;
					background-color: red;
					border-radius: 50rpx;
					margin-right: 20rpx;
				}

				>.right {
					margin-top: 40rpx;
					width: 400rpx;
					flex-grow: 1;
					height: 100rpx;

					// background-color: tomato;
					.inner {
						display: flex;
						justify-content: space-between;

					}
				}
			}
			.shop{
				padding: 0 4%;
				.lis {
					width: 48%;
					// padding: 0 4%;
					background-color: white;
					border-radius: 20rpx;
					overflow: hidden;
					// margin-top: 20rpx;
					margin-bottom: 20rpx;
					&:nth-child(2n-1) {
						margin-right: 4%;
					}
				}
			}

		}
	}
</style>
